package controller

import "github.com/gin-gonic/gin"

type Controller interface {
	RegisterRoute(g *gin.RouterGroup)
}

func RegisterRoutes(g *gin.RouterGroup) {
	g.Any("", index)
	g.Any("/index", index)
	new(TestController).RegisterRoute(g)
	new(AccountController).RegisterRoute(g)
	new(TopicController).RegisterRoute(g)
	new(UserController).RegisterRoute(g)
}

func index(c *gin.Context) {
	c.HTML(200, "index.html", nil)
}
